1. Field of the Invention
This invention relates generally to computer systems and more particularly to a method and apparatus for converting between various color space formats.
2. Description of the Related Art
Current liquid crystal display (LCD) controller designs incorporate display buffers that only support display data in RGB format. As is generally known, RGB format display data varies in color depth from 8, 16, or 24 bit-per-pixel (bpp). Newer LCD controllers incorporating digital video features, such as video input ports, JPEG, and MPEG functionality, require 16 or 24 bpp color depths to properly display live video or still images. Typically, the display data coming from various modules are converted to RGB format before storage into the display buffer.
For current generations of LCD controllers that support a camera interface and a JPEG CODEC, incoming YUV data from these modules are first converted to 16 bpp or 24 bpp (unpacked 32-bits wide) RGB data format by a YUV-RGB Converter (YRC). The converted data is then stored in the display buffer. In order to convert between YUV/Y′CbCr data (digital video signal format) and RGB data (display data format) and vice versa, a YRC (YUV-RGB Converter) or RYC (RGB-YUV Converter) is used. These converters use the standard equations for converting between these two formats.
FIG. 1 is an exemplary illustration of the equation for a typical YUV-RGB implementation. Here, RGB components 100 are the red/green/blue color components, YUV components 104 are the luminance and chrominance components, and 3×3 matrix 102 contains the conversion coefficients. Thus, the conversion process may be fixed to 4 or 5 processes, or even fewer, depending on the number of hard coded alternatives. Additionally, changes to the color characteristics, e.g., contrast, brightness, hue, color balance, etc., which affects the entire display, requires the computationally intensive reprogramming of a 256 bit look up table (LUT) or any other suitably sized LUT. This reprogramming consumes the limited resources, i.e., power and memory, of handheld devices, not to mention the delays that may be caused. Another shortcoming with the hard coded conversion process is that the input signal may not be easily adjusted independent of a color look up table, i.e., in order to adjust the input signal scaling and offset, changes must be made to the 3×3 matrix by first recalculating all 9 coefficients and then reprogramming the 3×3 matrix. However, the resulting values are not easily converted to show the intended change.
As a result, there is a need to solve the problems of the prior art to provide a color space conversion system and method that may linearly adjust the input to and the output from the conversion matrix independent of the color look up table efficiently.